package com.kingmed.kmss.framework.feign.client.auth;


import com.kingmed.kmss.common.dto.admin.ums.OACheckDTO;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * 调用OA接口
 */
@FeignClient(name = "RemoteOAService", url = "${oa.url}", fallback = RemoteOAFallbackService.class)
public interface RemoteOAService {

    /**
     * oa验证ticket是否有效地址
     */
    @PostMapping(value = "/sso/proxyValidate", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    Response proxyValidate(@RequestBody OACheckDTO oaCheckDTO);

    /**
     * oa登录校验
     */
    @PostMapping(value = "/sso/v1/tickets", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    Response oaLoginTickets(@RequestBody OACheckDTO oaCheckDTO);
}
